package com.itheima.d4_jdk8_time;

import java.util.Arrays;

public class Test8_compara {

        public static void main(String[] args) {
            Person[] people = {
                    new Person(25, "Alice"),
                    new Person(30, "Bob"),
                    new Person(22, "Charlie")
            };
            Arrays.sort(people);
            for (Person p : people) {
                System.out.println(p.name + " " + p.age);
            }
        }


}
